import { ApiProperty, PartialType } from '@nestjs/swagger';
import { IsNotEmpty, IsString } from 'class-validator';
import { Status } from 'src/constants';
import { HttpResponse } from 'src/share';
import { LoginRequestBody } from './login.dto';

export class RegisterRequestBody extends PartialType(LoginRequestBody) {
  @IsNotEmpty()
  @IsString()
  @ApiProperty({
    required: true,
  })
  nickname: string;
}

export class RegisterResponse extends HttpResponse {
  constructor() {
    super('ok', Status.SUCCESS);
  }
}

export class RegisterResponseFail_1 extends HttpResponse {
  constructor() {
    super('用户名重复', Status.FAILURE);
  }
}
